var baseUrl = "http://localhost:6138";


$.ajaxSetup({
	xhrFields: {
		withCredentials: true //允许跨域带Cookie
	},
	crossDomain: true,
});

var http = {

	ajax: function(type, url, data, funsuc, funerr) {
		$.ajax({
			type: type,
			url: baseUrl + url,
			data: data,
			xhrFields: {
				withCredentials: true //允许跨域带Cookie
			},
			crossDomain: true,
			success: function(data) {
				funsuc(data)
			},
			error: function(XMLHttpRequest, msg, ex) {
				funerr(XMLHttpRequest, msg, ex)
			}
		})
	}

};
